﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace ScreenManage
{
  public  class ScreenHelperOfWin7 : IScreenHelper
    {
        private static readonly int SDC_APPLY = 0x00000080;

        private static readonly int SDC_TOPOLOGY_EXTEND = 0x00000004;
        static readonly int SDC_TOPOLOGY_INTERNAL = 0x00000001;
        static readonly int SDC_TOPOLOGY_CLONE = 0x00000002;
       //  static readonly int SDC_TOPOLOGY_EXTEND = 0x00000004;
        static readonly int SDC_TOPOLOGY_EXTERNAL = 0x00000008;
       // UInt32 SDC_APPLY = 0x00000080;

        [DllImport("user32.dll")]
        private static extern int SetDisplayConfig(int numPathArrayElements, int pathArray, int numModeArrayElements, int
        modeArray, int flags);

        public void SetExpandScreen()
        {
           // SetDisplayConfig(0, 0, 0, 0, SDC_APPLY | SDC_TOPOLOGY_EXTEND);
            SetDisplayConfig(0, 0, 0, 0, SDC_APPLY | SDC_TOPOLOGY_EXTEND);
        }
    }
}
